package com.kikcn.demo.domain;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Set;

/**
 * User: Administrator
 * Date: 2015/4/20
 * Time: 21:28
 */
@Entity
@Table(name="T_BRAND")
public class Brand extends Base implements Serializable{
    @Column
    private String name;

    @OneToMany(fetch = FetchType.EAGER,mappedBy = "brand")
    private Set<Car> cars ;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Set<Car> getCars() {
        return cars;
    }

    public void setCars(Set<Car> cars) {
        this.cars = cars;
    }
}
